package com.wc.amq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @Description: 消费消息
 * @Author: wuchao
 * @Date: 2018/9/11
 */
@Component
public class MQConsumer {
    /**
     * 消费消息
     * @param text
     */
    @JmsListener(destination = "mytest.queue")
    public void receiveQueue(String text) {
        System.out.println("Consumer收到的报文为:"+text);
    }
}
